package com.example.fruitpool;

import org.andengine.entity.modifier.LoopEntityModifier;
import org.andengine.entity.modifier.RotationModifier;
import org.andengine.entity.sprite.AnimatedSprite;
import org.andengine.entity.sprite.Sprite;

public class Fruit {

	public AnimatedSprite sprit;
	public Sprite spritspec;
	public String id;
	public Fruit(AnimatedSprite sprite, String id) {
		this.sprit = sprite;
		this.id = id;
		this.sprit.setUserData(id);
		init();		
	}
	
	void init() {
		sprit.registerEntityModifier(new LoopEntityModifier(
				new RotationModifier(5, 0, 360)));
	}
	public Fruit(Sprite sprite, String id) {
		this.spritspec = sprite;
		this.id = id;
		initspec();		
	}
	void initspec() {
		spritspec.registerEntityModifier(new LoopEntityModifier(
				new RotationModifier(5, 0, 360)));
	}
}
